package com.soft.javase.ch04.test02;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/22
 * （2）Employee类中的属性有：
 *  * 工号ID（String型），工资wage（double类型），工龄（int型），定义该类的构造方法,
 *  * 且重写该类toString()方法；　
 */
public class Employee extends Person implements Add{
    String ID;
    double wage;
    int workAge;

    public Employee(String name, String address,  String ID, int wage, int workAge) {
        super(name, address);
        this.ID = ID;
        this.wage = wage;
        this.workAge = workAge;
    }

    @Override
    public String toString() {
        return "Employee{"+"name="+name+", address="+address+" ID="+ID+", wage="+wage+", workAge="+workAge+'}';
    }

//普通员工一次能涨10％
    @Override
    public void raiseSalary() {
        this.wage *=1.1;
    }
}
